package com.hx.collection;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author jxlgcmh
 * @create 2019-05-07 20:10
 */
public class PropertiesDemo {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        //properties.load(new FileInputStream("D:\\IdeaProjects\\JavaSeCollection\\src\\com\\hx\\jdbc.properties"));
        InputStream inputStream = PropertiesDemo.class.getResourceAsStream("jdbc.properties");
        properties.load(inputStream);
        Object key = properties.get("jdbc.url");
        System.out.println(key);

    }
}
